﻿using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Linq.Expressions;
using System.Net.Sockets;
using System.Reflection;
using System.Text;
using System.Threading.Tasks;
using LambdaManAi;

namespace LambdaManAiGenerator
{
    class Program
    {
        static void Main(string[] args)
        {
            UserFunctions.Processor = new ProcessorPrint();
            WriteAllUserFunctions();
            WriteLibraryFunctions();
        }

        public static void WriteAllUserFunctions()
        {
            foreach (MethodInfo method in typeof(UserFunctions).GetMethods())
            {
                if (method.Name != "Code" &&
                    method.Name != "ToString" &&
                    method.Name != "Equals" &&
                    method.Name != "GetHashCode" &&
                    method.Name != "GetType" &&
                    !method.IsSpecialName)
                {
                    method.Invoke(null, new object[] { null });
                }
            }
        }

        private static void WriteLibraryFunctions()
        {
            Console.Write(File.ReadAllText("commons.gcc"));
        }
    }
}
